
#include "stdio.h"


int main() {
    int nums[] = {2, 7, 11, 15}, target, numSize = sizeof(nums) / 4;
    scanf("%d",&target);
    for (int i = numSize; i > 0; --i) {
        for (int j = 0; j < i; ++j) {
            if (nums[i] + nums[j] == target){
                printf("%d %d", j, i);
            }
        }
    }
}